package com.ziytek.web.citizen.model.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 放电数据实体类（带时间戳与电流值）
 *
 * @author fenghx
 **/

@Data
@NoArgsConstructor
@AllArgsConstructor
public class DischargeData {
    /**
     * 精确到秒级
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime timestamp;
    /**
     * 单位：安培(mA)
     */
    private double current;

    public DischargeData(double current,LocalDateTime time) {
        this.current = current;
        this.timestamp = time;
    }
}